<template>
    <view>
       <web-view v-if="!ismp4" :webview-styles="webviewStyles" :src="src"></web-view>
		<video v-if="ismp4" :autoplay="true"  style="text-align: left" :src="src"   controls></video>
    </view>
</template>
<script>
    export default {
		onLoad(options){
			
			let stringUrl='?lk=12'
			for(let items in options){
				if(items=='urls'){
					continue;
				}
				stringUrl+='&'+items+'='+options[items]
			}
			
			this.ismp4=options.urls.indexOf('mp4')!=-1?true:false
			
			this.src=options.urls+stringUrl
		},
        data() {
			
            return {
				ismp4:true,
				src:'',
                webviewStyles: {
                    progress: {
                        color: '#FF3333'
                    }
                }
            }
        }
    }
</script>
<style>
	uni-video{
		width:100%;
	}
</style>
